import request from '@/utils/request'

// 查询值班日志分页
export function pageDutylog(query) {
  return request({
    url: '/base/dutylog/page',
    method: 'get',
    params: query,
    factoryId:true,
  })
}

// 查询值班日志列表
export function listDutylog(query) {
  return request({
    url: '/base/dutylog/list',
    method: 'get',
    params: query,
    factoryId:true
  })
}

// 查询值班日志详细
export function getDutylog(id) {
  return request({
    url: '/base/dutylog/info/' + id,
    method: 'get'
  })
}

// 新增值班日志
export function addDutylog(data) {
  return request({
    url: '/base/dutylog',
    method: 'post',
    data: data,
    factoryId:true,
  })
}

// 修改值班日志
export function updateDutylog(data) {
  return request({
    url: '/base/dutylog',
    method: 'put',
    data: data
  })
}

// 删除值班日志
export function delDutylog(data) {
  return request({
    url: '/base/dutylog/remove/batch',
    method: 'delete',
    data
  })
}

// 导出值班日志
export function exportDutylog(query) {
  return request({
    url: '/base/dutylog/export',
    method: 'get',
    params: query
  })
}

// 下载模板值班日志
export function downImportTemplate() {
  return request({
    url: '/base/dutylog/importTemplate',
    method: 'get'
  })
}